#import <Foundation/Foundation.h>
#import "SEGOnefileuploadModel.h"

#if __has_include(<Commom/SEGHTTPBusinessManager.h>)
#import <Commom/SEGHTTPBusinessManager.h>
#else
#import "SEGHTTPBusinessManager.h"
#endif

@interface SEGOnefileuploadManager : NSObject
#pragma mark - SINGLE----BEGIN----
+(instancetype)sharedManager;//创建单例
+(void)destroyResource;//销毁单例
#pragma mark - SINGLE----END----

#pragma mark - HTTP----BEGIN----

/**
 图片上传-单图

 @author Sam
 @param data 图片二进制
 @param name 图片名，格式：aa.jpg
 @param progress 上传进度回调
 @param completed 完成上传回调
 */
-(void)requestOnefileuploadWithData:(NSData*)data name:(NSString*)name progress:(void(^)(double progressValue))progress completed:(SEGReponseBlock)completed;

/**
 图片上传-单图
 
 @author Sam
 @param data 图片二进制
 @param progress 上传进度回调
 @param completed 完成上传回调
 */
-(void)requestOnefileuploadWithData:(NSData*)data progress:(void(^)(double progressValue))progress completed:(SEGReponseBlock)completed;

/**
 图片上传-单图
 
 @author Sam
 @param img 图片UIImage
 @param progress 上传进度回调
 @param completed 完成上传回调
 */
-(void)requestOnefileuploadWithImage:(UIImage*)img progress:(void(^)(double progressValue))progress completed:(SEGReponseBlock)completed;

/// 上传人脸识别图片（后台会对图片做校验）
/// @param image image
/// @param serviceType 0：b端服务，1：c端服务
/// @param completed completed
- (void)requestImageUploadToCheckFaceDetection:(UIImage *)image serviceType:(NSString*)serviceType completed:(SEGReponseBlock)completed;

#pragma mark - HTTP----END----

#pragma mark - SOURCE----BEGIN----
@property (nonatomic, strong) SEGOnefileuploadModel *oneFileUpload;
@property (nonatomic, copy, readonly) NSString *urlString; // 公开URL 物业服务里面有用到
#pragma mark - SOURCE----END----
@end
